package com.wanger.swc.config.myBatisPlus.autoDDL;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author: wanger
 * @Date: 2025/1/20 17:14
 * @Description:
 */
@Data
@Component
@ConfigurationProperties(prefix = "mybatis-plus.configuration.auto-ddl")
public class AutoDDlConfig {

    /**
     * 是否开启，默认为false
     */
    private boolean enabled = false;

    /**
     * 是否允许执行DDL，默认为false
     */
    private boolean executeDdl = false;

    /**
     * 扫描表
     */
    private String scanPackage = "com.*";

    /**
     * 忽略的表，该表将不生产警告
     */
    private final Set<String> ignoreTable = new HashSet<>();

    /**
     * 忽略的Entity，该表将不生产ddl
     */
    private final Set<Class<?>> ignoreEntity = new HashSet<>();

}
